<template>
  <div id="app">
<!--    <component :is="layout">-->
      <router-view v-if="isRouterAlive"/>
<!--    </component>-->
<!--    <router-view v-if="isRouterAlive"></router-view>-->
  </div>
</template>
<script>
export default {
  name: 'App',
  provide () {
    return {
      reload: this.reload
    }
  },
  data () {
    return {
      default_layout: 'default',//设置layout
      isRouterAlive: true
    }
  },
  computed:{
    layout(){
      //return this.default_layout + '-layout' //(this.$route.meta.layout ||
    }
  },
  methods: {
    reload () {
      this.isRouterAlive = false
      this.$nextTick(function () {
        this.isRouterAlive = true
      })
    }
  }
}
</script>
